package com.qf.service.impl;

import com.qf.entity.DeptVo;
import com.qf.entity.Emp;
import com.qf.entity.EmpVo;
import com.qf.mapper.EmpMapper;
import com.qf.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * --- 天道酬勤 ---
 *
 * @author GUOFUCHENG
 * @date 2025/8/8
 * @desc
 */
@Service
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpMapper empMapper;
    @Override
    public Emp findByEmpo(int empo) {
        System.out.println("empo = " + empo);
        return empMapper.findByEmpo(empo);
    }

    @Override
    public List<Emp> findAll(Emp emp) {
        return empMapper.findAll(emp);
    }

    @Override
    public Emp findByNameAndEmpno( String ename, int empno) {
        return empMapper.findByNameAndEmpno(ename, empno);
    }

    @Override
    public List<Emp> findMap(Map<String, String> map) {
        System.out.println("map2 = " + map);
        return empMapper.findMap(map);
    }

    @Override
    public int addEmp(Emp emp) {
        return empMapper.addEmp(emp);
    }

    @Override
    public int updateEmp(Emp emp1) {
        return empMapper.updateEmp(emp1);
    }

    @Override
    public int deleteEmp(int empno) {
        return empMapper.deleteEmp(empno);
    }

    @Override
    public EmpVo sreach(int empno) {
        return empMapper.sreach(empno);
    }

    @Override
    public DeptVo findInfo(int deptno) {
        return empMapper.findInfo(deptno);
    }


}
